package io.github.talelin.latticy.dto.oms.inbound_order;

import io.github.talelin.latticy.common.enumeration.InboundOrderEnum;
import io.github.talelin.latticy.common.enumeration.InboundOrderStatusEnum;
import io.github.talelin.latticy.common.pojo.BaseDO;
import io.github.talelin.latticy.model.oms.SenderAddressDO;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @program: latticy
 * @description: 入库单DTO
 * @author: mrxiao
 * @create: 2022-05-16 10:18
 */
@Data
@NoArgsConstructor
public class InboundOrderCreateDTO extends BaseDO {

    /**
     * 仓库code
     */
    @NotNull(message = "{inbound-order.warehouseCode.not-empty}")
    private String warehouseCode;

    /**
     * 0取消(删除),1草稿,2已审核3.在途,4仓库收货,5收货完成,6上架完成
     */
    @NotNull(message = "{inbound-order.status.not-empty}")
    private InboundOrderStatusEnum inboundOrderStatus;



    /**
     * 入库类型(1.常规入库 2.入库和转运)
     */
    @NotNull(message = "{inbound-order.type.not-empty}")
    private InboundOrderEnum inboundOrderType;

    /**
     * x
     * 货柜类型 1.箱子 2.托盘栈板 3.代表20 4.代表20GP 5.代表40GP 6.代表40HQ 7.代表45GP 8.代表45HQ
     */
    @NotNull(message = "{inbound-order.containerType.not-empty}")
    private Integer containerType;


    @NotEmpty(message = "{inbound-order.inboundPackagesList.not-empty}")
    @Valid
    private List<InboundPackagesDTO> inboundPackagesList;

    /**
     * 运输方式
     */
    @NotBlank(message = "{inbound-order.shippingMethod.not-blank}")
    private String shippingMethod;

    /**
     * 预计送达时间
     */
    @NotNull(message = "{inbound-order.estimateDeliveryTime.not-blank}")
    private String estimateDeliveryTime;

    /**
     * 入库栈板
     */
    @Positive
    private Integer inboundPallet;

    /**
     * 采购订单号(用英文,号分割)
     */
    private String purchaseOrderNo;

    /**
     * 物流跟踪号(用英文,号分割)
     */
    private String trackingNumber;

//    /**
//     * 总箱数
//     */
//    @NotNull(message = "{inbound-order.totalPackages.not-empty}")
//    private Integer totalPackages;
//
//
//    /**
//     * 总件数
//     */
//    @NotNull(message = "{inbound-order.totalNumber.not-empty}")
//    private Integer totalNumber;

    /**
     * 寄件人地址相关信息
     */
    private SenderAddressDO senderAddress;
}
